﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="recruiterPostJob.aspx.cs" Inherits="iResume.recruiterPostJob" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style5
        {
            text-align: center;
        }
        .style6
        {
            width: 410px;
            height: 25px;
        }
        .style7
        {
            height: 25px;
        }
        .style9
        {
            margin-left: 0px;
        }
        .style11
        {
            width: 112px;
            height: 25px;
            text-align: left;
        }
        .style13
        {
            height: 25px;
            text-align: left;
        }
        .style16
        {
            text-align: right;
            width: 106px;
        }
        .style21
        {
            margin-left: 22px;
        }
        .style22
        {
            text-align: left;
        }
        .style34
        {
            width: 123px;
        }
        .style35
        {
            margin-left: 0px;
            width: 796px;
            height: -6px;
            margin-top: 0px;
        }
        .style36
        {
            text-align: left;
            width: 307px;
        }
        .style39
        {
            text-align: left;
            height: 11px;
        }
        .style40
        {
            font-size: large;
        }
        .style51
        {
            width: 410px;
            height: 25px;
            text-align: left;
        }
        .style55
        {
            text-align: left;
            width: 106px;
        }
        .style57
        {
            height: 25px;
            text-align: center;
        }
        .style58
        {
            text-align: left;
            width: 112px;
        }
        .style60
        {
            margin-left: 0px;
            width: 795px;
            height: 2px;
            margin-top: 0px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <table style="width:100%;">
        <tr>
            <td class="style34" rowspan="19">
                <asp:Panel ID="Panel5" runat="server" Height="600px" BackColor="#FFFFCC" 
                    Width="98px">
                    <asp:ImageButton ID="ImageButton2" runat="server" ImageUrl="Picture/companyinfo.PNG" 
                        onclick="ImageButton2_Click" CausesValidation="False" />
                    <asp:ImageButton ID="ImageButton3" runat="server" ImageUrl="Picture/jobpost.PNG" 
                        onclick="ImageButton3_Click" CausesValidation="False" />
                    <br />
                    <br />
                    <asp:ImageButton ID="ImageButton5" runat="server" CausesValidation="False" 
                        Height="87px" ImageUrl="~/Picture/s1.png" 
                        PostBackUrl="~/SearchJobseeker.aspx" Width="74px" />
                </asp:Panel>
            </td>
            <td class="style39">
                &nbsp;</td>
            <td class="style39" colspan="4">
                <strong>
                <asp:Label ID="Label7" runat="server" CssClass="style40" Text="Post A Job"></asp:Label>
                </strong></td>
        </tr>
        <tr>
            <td class="style22">
                &nbsp;</td>
            <td class="style22" colspan="4">
                <hr class="style60" />
            </td>
        </tr>
        <tr>
            <td class="style58">
                &nbsp;</td>
            <td class="style58">
                <asp:Label ID="tbxDepartment" runat="server" Text="Job Category :"></asp:Label>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="ddlDP" ErrorMessage="*" ForeColor="Red" InitialValue="Please Select"></asp:RequiredFieldValidator>
            </td>
            <td class="style22">
                <asp:DropDownList ID="ddlDP" runat="server" CssClass="style9" 
                    onselectedindexchanged="ddlDP_SelectedIndexChanged" Width="252px">
                    <asp:ListItem>Please Select</asp:ListItem>
                    <asp:ListItem>Information Technology</asp:ListItem>
                    <asp:ListItem>Business</asp:ListItem>
                    <asp:ListItem>Applied Science</asp:ListItem>
                    <asp:ListItem>Engineering</asp:ListItem>
                    <asp:ListItem>Humanities &amp; Social Science</asp:ListItem>
                </asp:DropDownList>
            </td>
            <td class="style16">
                <asp:Label ID="Label5" runat="server" style="text-align: justify" 
                    Text="Job Description :"></asp:Label>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                    ControlToValidate="tbxDescrpition" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
            </td>
            <td class="style36" rowspan="4">
                <asp:TextBox ID="tbxDescrpition" runat="server" 
                    TextMode="MultiLine"
                    Style="max-height:80px; min-height:80px; max-width:300px; min-width:300px; margin-top: 0px;" 
                    Rows="5" Width="282px" Height ="100px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="style58">
                &nbsp;</td>
            <td class="style58">
                <asp:Label ID="Label2" runat="server" Text="Salary Range :"></asp:Label>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
                    ControlToValidate="ddlSalaryRange" ErrorMessage="*" ForeColor="Red" InitialValue="Please Select"></asp:RequiredFieldValidator>
            </td>
            <td class="style22">
                <asp:DropDownList ID="ddlSalaryRange" runat="server" 
                    Width="252px" CssClass="style9">
                     <asp:ListItem>Please Select</asp:ListItem>
                    <asp:ListItem>&gt;$1000</asp:ListItem>
                    <asp:ListItem>$1000-$3000</asp:ListItem>
                    <asp:ListItem>$3000-$5000</asp:ListItem>
                    <asp:ListItem>$5000-$7000</asp:ListItem>
                    <asp:ListItem>$7000-$10000</asp:ListItem>
                    <asp:ListItem>$1000 &amp; above</asp:ListItem>
                </asp:DropDownList>
            </td>
            <td class="style55">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style11">
                &nbsp;</td>
            <td class="style11">
                <asp:Label ID="Label3" runat="server" Text="Position Post :"></asp:Label>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                    ControlToValidate="tbxPosition" ErrorMessage="*" ForeColor="Red" ></asp:RequiredFieldValidator>
            </td>
            <td class="style13">
                <asp:TextBox ID="tbxPosition" runat="server" 
                    Width="252px" CssClass="style9"></asp:TextBox>
            </td>
            <td class="style55" rowspan="2">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style11">
                &nbsp;</td>
            <td class="style11">
                <asp:Label ID="Label6" runat="server" Text="Vacancy Available :"></asp:Label>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                    ControlToValidate="DropDownList1" ErrorMessage="*" ForeColor="Red" InitialValue="Please Select"></asp:RequiredFieldValidator>
            </td>
            <td class="style13">
                <asp:DropDownList ID="DropDownList1" runat="server">
                    <asp:ListItem>Please Select</asp:ListItem>
                    <asp:ListItem>1</asp:ListItem>
                    <asp:ListItem>2</asp:ListItem>
                    <asp:ListItem>3</asp:ListItem>
                    <asp:ListItem>4</asp:ListItem>
                    <asp:ListItem>5</asp:ListItem>
                    <asp:ListItem>6</asp:ListItem>
                    <asp:ListItem>7</asp:ListItem>
                    <asp:ListItem>8</asp:ListItem>
                    <asp:ListItem>9</asp:ListItem>
                    <asp:ListItem>10</asp:ListItem>
                    <asp:ListItem>&gt;10</asp:ListItem>
                    <asp:ListItem></asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="style6">
                &nbsp;</td>
            <td class="style6" colspan="2">
                &nbsp;</td>
            <td class="style57" colspan="2">
                <asp:ImageButton ID="ImageButton4" runat="server" Height="64px" 
                    ImageUrl="~/Picture/pp.png" onclick="ImageButton4_Click" 
                    style="margin-left: 311px" Width="63px" />
            </td>
        </tr>
        <tr>
            <td class="style51">
                &nbsp;</td>
            <td class="style51" colspan="2">
                <strong>
                <asp:Label ID="Label8" runat="server" CssClass="style40" Text="Job Posted"></asp:Label>
                </strong></td>
            <td class="style7" colspan="2">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style7">
                &nbsp;</td>
            <td class="style7" colspan="4">
                <hr class="style35" />
            </td>
        </tr>
        <tr>
            <td class="style5">
                &nbsp;</td>
            <td class="style5" colspan="4">
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                    DataKeyNames="jobID" DataSourceID="SqlDataSource1" 
                    onrowcommand="GridView1_RowCommand" BackColor="LightGoldenrodYellow" 
                    BorderColor="Tan" BorderWidth="1px" CellPadding="2" CssClass="style21" 
                    ForeColor="Black" GridLines="None" AllowPaging="True">
                    <AlternatingRowStyle BackColor="PaleGoldenrod" />
                    <Columns>
                        <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" 
                            ShowSelectButton="True" />
                        <asp:BoundField DataField="SalaryRange" HeaderText="SalaryRange" 
                            SortExpression="SalaryRange" />
                        <asp:BoundField DataField="JobPosition" HeaderText="JobPosition" 
                            SortExpression="JobPosition" />
                        <asp:BoundField DataField="category" HeaderText="category" 
                            SortExpression="category" />
                        <asp:BoundField DataField="JobDescription" HeaderText="JobDescription" 
                            SortExpression="JobDescription" />
                        <asp:BoundField DataField="VacancyAvailable" HeaderText="VacancyAvailable" 
                            SortExpression="VacancyAvailable" />
                        <asp:BoundField DataField="jobID" HeaderText="jobID" InsertVisible="False" 
                            ReadOnly="True" SortExpression="jobID" />
                    </Columns>
                    <FooterStyle BackColor="Tan" />
                    <HeaderStyle BackColor="Tan" Font-Bold="True" />
                    <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" 
                        HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
                    <SortedAscendingCellStyle BackColor="#FAFAE7" />
                    <SortedAscendingHeaderStyle BackColor="#DAC09E" />
                    <SortedDescendingCellStyle BackColor="#E1DB9C" />
                    <SortedDescendingHeaderStyle BackColor="#C2A47B" />
                </asp:GridView>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                    ConflictDetection="CompareAllValues" 
                    ConnectionString="<%$ ConnectionStrings:iResumeConnectionString %>" 
                    DeleteCommand="DELETE FROM [jobPosting] WHERE [jobID] = @original_jobID AND (([SalaryRange] = @original_SalaryRange) OR ([SalaryRange] IS NULL AND @original_SalaryRange IS NULL)) AND (([JobPosition] = @original_JobPosition) OR ([JobPosition] IS NULL AND @original_JobPosition IS NULL)) AND (([category] = @original_category) OR ([category] IS NULL AND @original_category IS NULL)) AND (([JobDescription] = @original_JobDescription) OR ([JobDescription] IS NULL AND @original_JobDescription IS NULL)) AND (([VacancyAvailable] = @original_VacancyAvailable) OR ([VacancyAvailable] IS NULL AND @original_VacancyAvailable IS NULL))" 
                    InsertCommand="INSERT INTO [jobPosting] ([SalaryRange], [JobPosition], [category], [JobDescription], [VacancyAvailable]) VALUES (@SalaryRange, @JobPosition, @category, @JobDescription, @VacancyAvailable)" 
                    OldValuesParameterFormatString="original_{0}" 
                    SelectCommand="SELECT SalaryRange, JobPosition, category, JobDescription, VacancyAvailable, jobID FROM jobPosting WHERE (email =@email)" 
                    
                    
                    UpdateCommand="UPDATE [jobPosting] SET [SalaryRange] = @SalaryRange, [JobPosition] = @JobPosition, [category] = @category, [JobDescription] = @JobDescription, [VacancyAvailable] = @VacancyAvailable WHERE [jobID] = @original_jobID AND (([SalaryRange] = @original_SalaryRange) OR ([SalaryRange] IS NULL AND @original_SalaryRange IS NULL)) AND (([JobPosition] = @original_JobPosition) OR ([JobPosition] IS NULL AND @original_JobPosition IS NULL)) AND (([category] = @original_category) OR ([category] IS NULL AND @original_category IS NULL)) AND (([JobDescription] = @original_JobDescription) OR ([JobDescription] IS NULL AND @original_JobDescription IS NULL)) AND (([VacancyAvailable] = @original_VacancyAvailable) OR ([VacancyAvailable] IS NULL AND @original_VacancyAvailable IS NULL))">
                    <DeleteParameters>
                        <asp:Parameter Name="original_jobID" Type="Int32" />
                        <asp:Parameter Name="original_SalaryRange" Type="String" />
                        <asp:Parameter Name="original_JobPosition" Type="String" />
                        <asp:Parameter Name="original_category" Type="String" />
                        <asp:Parameter Name="original_JobDescription" Type="String" />
                        <asp:Parameter Name="original_VacancyAvailable" Type="String" />
                    </DeleteParameters>
                    <InsertParameters>
                        <asp:Parameter Name="SalaryRange" Type="String" />
                        <asp:Parameter Name="JobPosition" Type="String" />
                        <asp:Parameter Name="category" Type="String" />
                        <asp:Parameter Name="JobDescription" Type="String" />
                        <asp:Parameter Name="VacancyAvailable" Type="String" />
                    </InsertParameters>
                    <SelectParameters>
                        <asp:SessionParameter Name="email" SessionField="username" />
                    </SelectParameters>
                    <UpdateParameters>
                        <asp:Parameter Name="SalaryRange" Type="String" />
                        <asp:Parameter Name="JobPosition" Type="String" />
                        <asp:Parameter Name="category" Type="String" />
                        <asp:Parameter Name="JobDescription" Type="String" />
                        <asp:Parameter Name="VacancyAvailable" Type="String" />
                        <asp:Parameter Name="original_jobID" Type="Int32" />
                        <asp:Parameter Name="original_SalaryRange" Type="String" />
                        <asp:Parameter Name="original_JobPosition" Type="String" />
                        <asp:Parameter Name="original_category" Type="String" />
                        <asp:Parameter Name="original_JobDescription" Type="String" />
                        <asp:Parameter Name="original_VacancyAvailable" Type="String" />
                    </UpdateParameters>
                </asp:SqlDataSource>
            </td>
        </tr>
        <tr>
            <td class="style5">
                &nbsp;</td>
            <td class="style5" colspan="4">
                &nbsp;</td>
        </tr>
    </table>
</asp:Content>
